package com.quanyan.user.serviceFacade.impl;


import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.user.request.ReqNewsTopic;
import com.quanyan.user.request.ReqUserFollow;
import com.quanyan.user.response.ReqReleaseDynamic;
import com.quanyan.user.response.RespClubDynamicInfo;
import com.quanyan.user.response.RespNewsTopic;
import com.quanyan.user.response.RespUserFollow;
import com.quanyan.user.service.TopicService;
import com.quanyan.user.service.UserDynamicService;
import com.quanyan.user.service.UserFollowService;
import com.quanyan.user.serviceFacade.UserDynamicServiceFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/11/30.
 */
@Service("userDynamicServiceFacade")
public class UserDynamicServiceFacadeImpl implements UserDynamicServiceFacade {

    @Autowired
    private TopicService topicService;

    @Autowired
    private UserFollowService userFollowService;

    @Autowired
    private UserDynamicService userDynamicService;

    @Override
    public PageObj<List<RespNewsTopic>> findAllTopic(ReqNewsTopic reqNewsTopic) {
        return topicService.findAllTopic(reqNewsTopic);
    }

    @Override
    public APIResponse<List<RespUserFollow>> queryUserFriendService(ReqUserFollow reqUserFollow) {
        return userFollowService.queryUserFriendService(reqUserFollow);
    }

    @Override
    public APIResponse<List<Integer>> batchIsUserFollow(Integer uid, List<Integer> lstFollowId) {
        return userFollowService.batchIsUserFollow(uid,lstFollowId);
    }

    @Override
    public APIResponse addDynamicDetail(ReqReleaseDynamic reqReleaseDynamic) {
        return userDynamicService.addDynamicDetail(reqReleaseDynamic);
    }

    /**
     * 获取俱乐部推荐动态
     * @param clubIdList
     * @return
     */
    @Override
    public Map<Integer, RespClubDynamicInfo> getClubRecommendDynamicList(List<Integer> clubIdList) {
        return userDynamicService.getClubRecommendDynamicList(clubIdList);
    }
}
